<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>学生注册</title>

</head>
<body>
<%
request.setCharacterEncoding("utf-8");
String DriverName = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost:3306/student";
String user = "root";
String password = "123456";
Connection conn;
Statement stmt;
ResultSet rs;
Class.forName(DriverName);
conn = DriverManager.getConnection(url, user, password);
stmt = conn.createStatement();
String getid=request.getParameter("ID");
String getname=request.getParameter("name");
String getpass=request.getParameter("pass");
String sql="INSERT INTO user_t (UserID, UserName, UserPass) VALUES ('"+getid+"', '"+getname+"', '"+getpass+"')";
stmt.executeUpdate(sql);
out.print("1");
//response.sendRedirect("sign.jsp");
%>
</body>
<html>